<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
  <head>
  	<c:import url="../includes/headBootstrap.jsp"/>
    <title>Grafico 1</title>
  </head>
  <body>
    <c:import url="../includes/header.jsp"/>
    
    <div class="container">
		
		<c:if test="${formMesAno == true }">
			<div class="row">
		        <div>
		        	<a href="<c:url value="/poslogin/grafico/gastoNoMes/${anoPrev}/${mesPrev}"/>">
		        		<button type="button" class="btn btn-lg btn-primary">${mesPrev}/${anoPrev}</button>
		        	</a>
		        
		    		<a href="<c:url value="/poslogin/grafico/gastoNoMes/${anoNext}/${mesNext}"/>">
		    			<button type="button" class="btn btn-lg btn-primary" style="float:right;">${mesNext}/${anoNext}</button>
		    			</a>
				</div>
			</div>
			<br><br>
			
			<c:if test="${valorGasto <= 4000}">
				<div class="progress" style="background-color: #5bc0de;">
				  <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="${valorGasto}" aria-valuemin="0" aria-valuemax="4000" style="width: ${valorGasto*100/4000}%">
				  	R$ ${valorGasto}
				  </div>
				  R$ 4000.00
				</div>
			</c:if>
			<c:if test="${valorGasto > 4000}">
				<div class="progress" style="background-color: #d9534f;">
				  <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="4000" aria-valuemin="0" aria-valuemax="${valorGasto}" style="width: ${4000*100/valorGasto}%">
				  	R$ 4000.00
				  </div>
				  <span style="float:right;">R$ ${valorGasto}</span>
				</div>
			</c:if>

			
		</c:if>	
		 
		 
		<div id="chartContainer" style="height: 300px; width: 100%;"></div>
	</div>
	<c:import url="../includes/footBootstrap.jsp"/>    
  </body>
</html>